package com.kvest.map.mapview.engine.utils;

/**
 * Created with IntelliJ IDEA.
 * User: r.belokon
 * Date: 22.04.13
 * Time: 11:30
 * To change this template use File | Settings | File Templates.
 */
public abstract class ColorUtils {
    public static int getBlue(int color) {
        return (color & 0xff);
    }

    public static int getGreen(int color) {
        return ((color >> 8) & 0xff);
    }

    public static int getRed(int color) {
        return ((color >> 16) & 0xff);
    }

    public static int getAlpha(int color) {
        return ((color >> 24) & 0xff);
    }

    public static float getRedf(int color) {
        return (getRed(color) / 255.0f);
    }

    public static float getGreenf(int color) {
        return (getGreen(color) / 255.0f);
    }

    public static float getBluef(int color) {
        return (getBlue(color) / 255.0f);
    }

    public static float getAlphaf(int color) {
        return (getAlpha(color) / 255.0f);
    }
}
